/**********************************************************************/
/*   ____  ____                                                       */
/*  /   /\/   /                                                       */
/* /___/  \  /                                                        */
/* \   \   \/                                                       */
/*  \   \        Copyright (c) 2003-2009 Xilinx, Inc.                */
/*  /   /          All Right Reserved.                                 */
/* /---/   /\                                                         */
/* \   \  /  \                                                      */
/*  \___\/\___\                                                    */
/***********************************************************************/

/* This file is designed for use with ISim build 0xfbc00daa */

#define XSI_HIDE_SYMBOL_SPEC true
#include "xsi.h"
#include <memory.h>
#ifdef __GNUC__
#include <stdlib.h>
#else
#include <malloc.h>
#define alloca _alloca
#endif
static const char *ng0 = "ext_red_p = %d , ext_green_p = %d, ext_blue_p = %d";
static const char *ng1 = "tmds = %b, tmdsb = %b";
static const char *ng2 = "/home/choosegoose/code/shane-branch/external_hmd_tb.v";
static int ng3[] = {0, 0};
static unsigned int ng4[] = {111U, 0U};
static unsigned int ng5[] = {101U, 0U};
static unsigned int ng6[] = {255U, 0U};
static unsigned int ng7[] = {0U, 0U};

void Monitor_63_3(char *);
void Monitor_64_4(char *);
void Monitor_69_5(char *);
void Monitor_70_6(char *);
void Monitor_75_7(char *);
void Monitor_76_8(char *);
void Monitor_81_9(char *);
void Monitor_82_10(char *);
void Monitor_63_3(char *);
void Monitor_64_4(char *);
void Monitor_69_5(char *);
void Monitor_70_6(char *);
void Monitor_75_7(char *);
void Monitor_76_8(char *);
void Monitor_81_9(char *);
void Monitor_82_10(char *);


static void Monitor_63_3_Func(char *t0)
{
    char *t1;
    char *t2;
    char *t3;
    char *t4;
    char *t5;
    char *t6;
    char *t7;
    char *t8;
    char *t9;

LAB0:    t1 = (t0 + 1768);
    t2 = (t1 + 56U);
    t3 = *((char **)t2);
    t4 = (t0 + 1928);
    t5 = (t4 + 56U);
    t6 = *((char **)t5);
    t7 = (t0 + 2088);
    t8 = (t7 + 56U);
    t9 = *((char **)t8);
    xsi_vlogfile_write(1, 0, 3, ng0, 4, t0, (char)118, t3, 8, (char)118, t6, 8, (char)118, t9, 8);

LAB1:    return;
}

static void Monitor_64_4_Func(char *t0)
{
    char *t1;
    char *t2;
    char *t3;

LAB0:    t1 = (t0 + 1048U);
    t2 = *((char **)t1);
    t1 = (t0 + 1208U);
    t3 = *((char **)t1);
    xsi_vlogfile_write(1, 0, 3, ng1, 3, t0, (char)118, t2, 4, (char)118, t3, 4);

LAB1:    return;
}

static void Monitor_69_5_Func(char *t0)
{
    char *t1;
    char *t2;
    char *t3;
    char *t4;
    char *t5;
    char *t6;
    char *t7;
    char *t8;
    char *t9;

LAB0:    t1 = (t0 + 1768);
    t2 = (t1 + 56U);
    t3 = *((char **)t2);
    t4 = (t0 + 1928);
    t5 = (t4 + 56U);
    t6 = *((char **)t5);
    t7 = (t0 + 2088);
    t8 = (t7 + 56U);
    t9 = *((char **)t8);
    xsi_vlogfile_write(1, 0, 3, ng0, 4, t0, (char)118, t3, 8, (char)118, t6, 8, (char)118, t9, 8);

LAB1:    return;
}

static void Monitor_70_6_Func(char *t0)
{
    char *t1;
    char *t2;
    char *t3;

LAB0:    t1 = (t0 + 1048U);
    t2 = *((char **)t1);
    t1 = (t0 + 1208U);
    t3 = *((char **)t1);
    xsi_vlogfile_write(1, 0, 3, ng1, 3, t0, (char)118, t2, 4, (char)118, t3, 4);

LAB1:    return;
}

static void Monitor_75_7_Func(char *t0)
{
    char *t1;
    char *t2;
    char *t3;
    char *t4;
    char *t5;
    char *t6;
    char *t7;
    char *t8;
    char *t9;

LAB0:    t1 = (t0 + 1768);
    t2 = (t1 + 56U);
    t3 = *((char **)t2);
    t4 = (t0 + 1928);
    t5 = (t4 + 56U);
    t6 = *((char **)t5);
    t7 = (t0 + 2088);
    t8 = (t7 + 56U);
    t9 = *((char **)t8);
    xsi_vlogfile_write(1, 0, 3, ng0, 4, t0, (char)118, t3, 8, (char)118, t6, 8, (char)118, t9, 8);

LAB1:    return;
}

static void Monitor_76_8_Func(char *t0)
{
    char *t1;
    char *t2;
    char *t3;

LAB0:    t1 = (t0 + 1048U);
    t2 = *((char **)t1);
    t1 = (t0 + 1208U);
    t3 = *((char **)t1);
    xsi_vlogfile_write(1, 0, 3, ng1, 3, t0, (char)118, t2, 4, (char)118, t3, 4);

LAB1:    return;
}

static void Monitor_81_9_Func(char *t0)
{
    char *t1;
    char *t2;
    char *t3;
    char *t4;
    char *t5;
    char *t6;
    char *t7;
    char *t8;
    char *t9;

LAB0:    t1 = (t0 + 1768);
    t2 = (t1 + 56U);
    t3 = *((char **)t2);
    t4 = (t0 + 1928);
    t5 = (t4 + 56U);
    t6 = *((char **)t5);
    t7 = (t0 + 2088);
    t8 = (t7 + 56U);
    t9 = *((char **)t8);
    xsi_vlogfile_write(1, 0, 3, ng0, 4, t0, (char)118, t3, 8, (char)118, t6, 8, (char)118, t9, 8);

LAB1:    return;
}

static void Monitor_82_10_Func(char *t0)
{
    char *t1;
    char *t2;
    char *t3;

LAB0:    t1 = (t0 + 1048U);
    t2 = *((char **)t1);
    t1 = (t0 + 1208U);
    t3 = *((char **)t1);
    xsi_vlogfile_write(1, 0, 3, ng1, 3, t0, (char)118, t2, 4, (char)118, t3, 4);

LAB1:    return;
}

static void Initial_47_0(char *t0)
{
    char *t1;
    char *t2;

LAB0:    xsi_set_current_line(47, ng2);

LAB2:    xsi_set_current_line(49, ng2);
    t1 = ((char*)((ng3)));
    t2 = (t0 + 1608);
    xsi_vlogvar_assign_value(t2, t1, 0, 0, 1);
    xsi_set_current_line(50, ng2);
    t1 = ((char*)((ng3)));
    t2 = (t0 + 1768);
    xsi_vlogvar_assign_value(t2, t1, 0, 0, 8);
    xsi_set_current_line(51, ng2);
    t1 = ((char*)((ng3)));
    t2 = (t0 + 1928);
    xsi_vlogvar_assign_value(t2, t1, 0, 0, 8);
    xsi_set_current_line(52, ng2);
    t1 = ((char*)((ng3)));
    t2 = (t0 + 2088);
    xsi_vlogvar_assign_value(t2, t1, 0, 0, 8);

LAB1:    return;
}

static void Always_55_1(char *t0)
{
    char t3[8];
    char *t1;
    char *t2;
    char *t4;
    char *t5;
    char *t6;
    char *t7;
    unsigned int t8;
    unsigned int t9;
    unsigned int t10;
    unsigned int t11;
    unsigned int t12;
    char *t13;
    char *t14;
    char *t15;
    unsigned int t16;
    unsigned int t17;
    unsigned int t18;
    unsigned int t19;
    unsigned int t20;
    unsigned int t21;
    unsigned int t22;
    unsigned int t23;
    char *t24;

LAB0:    t1 = (t0 + 3248U);
    t2 = *((char **)t1);
    if (t2 == 0)
        goto LAB2;

LAB3:    goto *t2;

LAB2:    xsi_set_current_line(55, ng2);

LAB4:    xsi_set_current_line(56, ng2);
    t2 = (t0 + 3056);
    xsi_process_wait(t2, 5000LL);
    *((char **)t1) = &&LAB5;

LAB1:    return;
LAB5:    xsi_set_current_line(56, ng2);
    t4 = (t0 + 1608);
    t5 = (t4 + 56U);
    t6 = *((char **)t5);
    memset(t3, 0, 8);
    t7 = (t6 + 4);
    t8 = *((unsigned int *)t7);
    t9 = (~(t8));
    t10 = *((unsigned int *)t6);
    t11 = (t10 & t9);
    t12 = (t11 & 1U);
    if (t12 != 0)
        goto LAB9;

LAB7:    if (*((unsigned int *)t7) == 0)
        goto LAB6;

LAB8:    t13 = (t3 + 4);
    *((unsigned int *)t3) = 1;
    *((unsigned int *)t13) = 1;

LAB9:    t14 = (t3 + 4);
    t15 = (t6 + 4);
    t16 = *((unsigned int *)t6);
    t17 = (~(t16));
    *((unsigned int *)t3) = t17;
    *((unsigned int *)t14) = 0;
    if (*((unsigned int *)t15) != 0)
        goto LAB11;

LAB10:    t22 = *((unsigned int *)t3);
    *((unsigned int *)t3) = (t22 & 1U);
    t23 = *((unsigned int *)t14);
    *((unsigned int *)t14) = (t23 & 1U);
    t24 = (t0 + 1608);
    xsi_vlogvar_assign_value(t24, t3, 0, 0, 1);
    goto LAB2;

LAB6:    *((unsigned int *)t3) = 1;
    goto LAB9;

LAB11:    t18 = *((unsigned int *)t3);
    t19 = *((unsigned int *)t15);
    *((unsigned int *)t3) = (t18 | t19);
    t20 = *((unsigned int *)t14);
    t21 = *((unsigned int *)t15);
    *((unsigned int *)t14) = (t20 | t21);
    goto LAB10;

}

static void Initial_59_2(char *t0)
{
    char *t1;
    char *t2;
    char *t3;
    char *t4;

LAB0:    t1 = (t0 + 3496U);
    t2 = *((char **)t1);
    if (t2 == 0)
        goto LAB2;

LAB3:    goto *t2;

LAB2:    xsi_set_current_line(59, ng2);

LAB4:    xsi_set_current_line(60, ng2);
    t2 = ((char*)((ng4)));
    t3 = (t0 + 1768);
    xsi_vlogvar_wait_assign_value(t3, t2, 0, 0, 8, 0LL);
    xsi_set_current_line(61, ng2);
    t2 = ((char*)((ng4)));
    t3 = (t0 + 1928);
    xsi_vlogvar_wait_assign_value(t3, t2, 0, 0, 8, 0LL);
    xsi_set_current_line(62, ng2);
    t2 = ((char*)((ng4)));
    t3 = (t0 + 2088);
    xsi_vlogvar_wait_assign_value(t3, t2, 0, 0, 8, 0LL);
    xsi_set_current_line(63, ng2);
    Monitor_63_3(t0);
    xsi_set_current_line(64, ng2);
    Monitor_64_4(t0);
    xsi_set_current_line(65, ng2);
    t2 = (t0 + 3304);
    xsi_process_wait(t2, 10000LL);
    *((char **)t1) = &&LAB5;

LAB1:    return;
LAB5:    xsi_set_current_line(66, ng2);
    t3 = ((char*)((ng5)));
    t4 = (t0 + 1768);
    xsi_vlogvar_wait_assign_value(t4, t3, 0, 0, 8, 0LL);
    xsi_set_current_line(67, ng2);
    t2 = ((char*)((ng5)));
    t3 = (t0 + 1928);
    xsi_vlogvar_wait_assign_value(t3, t2, 0, 0, 8, 0LL);
    xsi_set_current_line(68, ng2);
    t2 = ((char*)((ng5)));
    t3 = (t0 + 2088);
    xsi_vlogvar_wait_assign_value(t3, t2, 0, 0, 8, 0LL);
    xsi_set_current_line(69, ng2);
    Monitor_69_5(t0);
    xsi_set_current_line(70, ng2);
    Monitor_70_6(t0);
    xsi_set_current_line(71, ng2);
    t2 = (t0 + 3304);
    xsi_process_wait(t2, 10000LL);
    *((char **)t1) = &&LAB6;
    goto LAB1;

LAB6:    xsi_set_current_line(72, ng2);
    t3 = ((char*)((ng6)));
    t4 = (t0 + 1768);
    xsi_vlogvar_wait_assign_value(t4, t3, 0, 0, 8, 0LL);
    xsi_set_current_line(73, ng2);
    t2 = ((char*)((ng6)));
    t3 = (t0 + 1928);
    xsi_vlogvar_wait_assign_value(t3, t2, 0, 0, 8, 0LL);
    xsi_set_current_line(74, ng2);
    t2 = ((char*)((ng6)));
    t3 = (t0 + 2088);
    xsi_vlogvar_wait_assign_value(t3, t2, 0, 0, 8, 0LL);
    xsi_set_current_line(75, ng2);
    Monitor_75_7(t0);
    xsi_set_current_line(76, ng2);
    Monitor_76_8(t0);
    xsi_set_current_line(77, ng2);
    t2 = (t0 + 3304);
    xsi_process_wait(t2, 10000LL);
    *((char **)t1) = &&LAB7;
    goto LAB1;

LAB7:    xsi_set_current_line(78, ng2);
    t3 = ((char*)((ng7)));
    t4 = (t0 + 1768);
    xsi_vlogvar_wait_assign_value(t4, t3, 0, 0, 8, 0LL);
    xsi_set_current_line(79, ng2);
    t2 = ((char*)((ng7)));
    t3 = (t0 + 1928);
    xsi_vlogvar_wait_assign_value(t3, t2, 0, 0, 8, 0LL);
    xsi_set_current_line(80, ng2);
    t2 = ((char*)((ng7)));
    t3 = (t0 + 2088);
    xsi_vlogvar_wait_assign_value(t3, t2, 0, 0, 8, 0LL);
    xsi_set_current_line(81, ng2);
    Monitor_81_9(t0);
    xsi_set_current_line(82, ng2);
    Monitor_82_10(t0);
    xsi_set_current_line(83, ng2);
    t2 = (t0 + 3304);
    xsi_process_wait(t2, 200000LL);
    *((char **)t1) = &&LAB8;
    goto LAB1;

LAB8:    xsi_set_current_line(83, ng2);
    xsi_vlog_finish(1);
    goto LAB1;

}

void Monitor_63_3(char *t0)
{
    char *t1;
    char *t2;

LAB0:    t1 = (t0 + 3552);
    t2 = (t0 + 5800);
    xsi_vlogfile_monitor((void *)Monitor_63_3_Func, t1, t2);

LAB1:    return;
}

void Monitor_64_4(char *t0)
{
    char *t1;
    char *t2;

LAB0:    t1 = (t0 + 3800);
    t2 = (t0 + 5816);
    xsi_vlogfile_monitor((void *)Monitor_64_4_Func, t1, t2);

LAB1:    return;
}

void Monitor_69_5(char *t0)
{
    char *t1;
    char *t2;

LAB0:    t1 = (t0 + 4048);
    t2 = (t0 + 5832);
    xsi_vlogfile_monitor((void *)Monitor_69_5_Func, t1, t2);

LAB1:    return;
}

void Monitor_70_6(char *t0)
{
    char *t1;
    char *t2;

LAB0:    t1 = (t0 + 4296);
    t2 = (t0 + 5848);
    xsi_vlogfile_monitor((void *)Monitor_70_6_Func, t1, t2);

LAB1:    return;
}

void Monitor_75_7(char *t0)
{
    char *t1;
    char *t2;

LAB0:    t1 = (t0 + 4544);
    t2 = (t0 + 5864);
    xsi_vlogfile_monitor((void *)Monitor_75_7_Func, t1, t2);

LAB1:    return;
}

void Monitor_76_8(char *t0)
{
    char *t1;
    char *t2;

LAB0:    t1 = (t0 + 4792);
    t2 = (t0 + 5880);
    xsi_vlogfile_monitor((void *)Monitor_76_8_Func, t1, t2);

LAB1:    return;
}

void Monitor_81_9(char *t0)
{
    char *t1;
    char *t2;

LAB0:    t1 = (t0 + 5040);
    t2 = (t0 + 5896);
    xsi_vlogfile_monitor((void *)Monitor_81_9_Func, t1, t2);

LAB1:    return;
}

void Monitor_82_10(char *t0)
{
    char *t1;
    char *t2;

LAB0:    t1 = (t0 + 5288);
    t2 = (t0 + 5912);
    xsi_vlogfile_monitor((void *)Monitor_82_10_Func, t1, t2);

LAB1:    return;
}


extern void work_m_18331214885258036167_4166284708_init()
{
	static char *pe[] = {(void *)Initial_47_0,(void *)Always_55_1,(void *)Initial_59_2,(void *)Monitor_63_3,(void *)Monitor_64_4,(void *)Monitor_69_5,(void *)Monitor_70_6,(void *)Monitor_75_7,(void *)Monitor_76_8,(void *)Monitor_81_9,(void *)Monitor_82_10};
	xsi_register_didat("work_m_18331214885258036167_4166284708", "isim/external_hmd_tb_isim_beh.exe.sim/work/m_18331214885258036167_4166284708.didat");
	xsi_register_executes(pe);
}
